<?php

/**
 * Description of DoctrineController
 *
 * @author     Mon Zafra <monzee at gmail>
 * @copyright  (c)2009 Mon Zafra
 * @category   Mz
 * @package
 * @license    http://mz-project.googlecode.com/svn/trunk/LICENSE    MIT License
 * @version    SVN: $Id: DoctrineController.php 47 2009-05-28 17:56:56Z monzee $
 */
class Admin_DoctrineController extends Zend_Controller_Action
{
    public function indexAction()
    {
        $this->_helper->viewRenderer->setNoRender();
        $this->view->headTitle('Doctrine Test');
        $q = Doctrine_Query::create()
                           ->from('Admin_Model_Doctrine_User u')
                           ->leftJoin('u.Roles r')
                           ->leftJoin('r.Parents p')
                           ->select('u.username, r.id, p.id')
                           ->where('u.username = ?', 'foo_editor');
        $res = $q->fetchArray();
        echo '<pre>';
        var_dump($res);
        echo '</pre>';
    }


}